<form id="pagerForm" method="post" action="{:url('Sqd/index')}">
	<input type="hidden" name="license_type" value="{$license_type|default=''}">
    <input type="hidden" name="order_status" value="{$order_status|default=''}"/>
    <input type="hidden" name="zt" value="{$zt|default=''}"/>
    <input type="hidden" name="start_time" value="{$start_time|default=''}"/>
    <input type="hidden" name="end_time" value="{$end_time|default=''}"/>
    <input type="hidden" name="subscribe_date" value="{$subscribe_date|default=''}"/>
    <input type="hidden" name="user_name" value="{$user_name|default=''}">
    <input type="hidden" name="mobile" value="{$mobile}"/>
    <input type="hidden" name="license_number" value="{$license_number|default=''}"/>
    <input type="hidden" name="order_sn" value="{$order_sn|default=''}"/>
    <input type="hidden" name="pageNum" value="{$page|default=''}"/>
    <input type="hidden" name="numPerPage" value="{$page_size|default=''}"/>
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="{:url('Sqd/index')}" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>车辆类型:</td>
					<td>
						<select class="combox" name="license_type">
							<option value="" {if condition="$license_type eq ''"}selected="selected"{/if}>全部</option>
                            {volist name="vehicle" id="item"}
                            <option value="{$item.id}" {if condition="$license_type eq $item.id"}selected="selected"{/if}>{$item.title}</option>
                            {/volist}
						</select>
					</td>
					<td>订单状态:</td>
					<td>
						<select class="combox" id="order_status" name="order_status">
							<option value="" selected="selected">全部</option>
							{eq name="order_status" value="0"}
							<option value="0" selected="selected">未付款</option>
							{else/}
							<option value="0">未付款</option>
							{/eq}
							{eq name="order_status" value="2"}
							<option value="2" selected="selected">待检车</option>
							{else/}
							<option value="2">待检车</option>
							{/eq}
                            {eq name="order_status" value="2"}
							<option value="3" selected="selected">已完成</option>
							{else/}
							<option value="3">已完成</option>
							{/eq}
                            {eq name="order_status" value="2"}
							<option value="4" selected="selected">已取消</option>
							{else/}
							<option value="4">已取消</option>
							{/eq}
						</select>
					</td>
                    <td>预约状态：</td>
                    <td>
                        <select class="combox" id="zt" name="zt">
                            <option value="" selected="selected">全部</option>
                            {eq name="zt" value="2"}
                            <option value="2" selected="selected">预约成功</option>
                            {else/}
                            <option value="2">预约成功</option>
                            {/eq}
                            {eq name="zt" value="0"}
                            <option value="0" selected="selected">审核中</option>
                            {else/}
                            <option value="0">审核中</option>
                            {/eq}
                            {eq name="zt" value="-2"}
                            <option value="-2" selected="selected">未通过</option>
                            {else/}
                            <option value="-2">未通过</option>
                            {/eq}
                            {eq name="zt" value="-1"}
                            <option value="-1" selected="selected">已取消</option>
                            {else/}
                            <option value="-1">已取消</option>
                            {/eq}
                            {eq name="zt" value="3"}
                            <option value="3" selected="selected">检测中</option>
                            {else/}
                            <option value="3">检测中</option>
                            {/eq}
                            {eq name="zt" value="10"}
                            <option value="10" selected="selected">已完成</option>
                            {else/}
                            <option value="10">已完成</option>
                            {/eq}
                        </select>
                    </td>
                    <td>开始时间(下单)：</td>
                    <td><input name="start_time" type="text" class="date" datefmt="yyyy-MM-dd" readonly="true" value="{$start_time|default=''}"></td>
                    <td>结束时间(下单)：</td>
                    <td><input name="end_time" type="text" class="date" datefmt="yyyy-MM-dd" readonly="true" value="{$end_time|default=''}"></td>
                    <td>预约时间：</td>
                    <td><input name="subscribe_date" type="text" class="date" datefmt="yyyy-MM-dd" readonly="true" value="{$subscribe_date|default=''}"></td>
				</tr>
                <tr>
                    <td>所有人姓名:</td>
					<td><input name="user_name" size="25" type="text" value="{$user_name}"/></td>
					<td>联系电话:</td>
					<td><input name="mobile" size="25" type="text" value="{$mobile}"/></td>
                    <td>车牌号码:</td>
                    <td><input name="license_number" size="20" type="text" value="{$license_number|default=''}"/></td>
					<td>订单编号：</td>
					<td><input name="order_sn" size="25" type="text" value="{$order_sn}"/></td>
                    <td>
                        <div class="subBar">
                            <div class="buttonActive">
                                <div class="buttonContent">
                                    <button type="submit">搜索</button>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
			</table>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="table" width="100%" layoutH="133">
		<thead>
			<tr>
				<th width="10%">订单编号</th>
				<th width="5%">订单状态</th>
                <th width="5%">预约状态</th>
				<th width="6%">号牌号码</th>
				<th width="6%">车辆类型</th>
				<th width="7%">所有人姓名</th>
				<th width="6%">联系电话</th>
                <th width="5%">订单总价</th>
				<th width="10%">预约时间</th>
                <th width="10%">下单时间</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="val" key="i"}
			<tr>
				<td class="o-num"> {$val.order_sn}</td>
                <td>
                    {switch name="val.order_status"}
                    {case value="0"}
                    未付款
                    {/case}
                    {case value="2"}
                    待检车
                    {/case}
                    {case value="3"}
                    已完成
                    {/case}
                    {case value="4"}
                    已取消
                    {/case}
                    {/switch}
                </td>
                <td>
                    {switch name="val.zt"}
                    {case value="-2"}
                    <span style="color:#FF5722;line-height: 21px;">未通过</span>
                    {/case}
                    {case value="-1"}
                    已取消
                    {/case}
                    {case value="0"}
                    <span style="color:#ff9c3c;line-height: 21px;">待审核</span>
                    {/case}
                    {case value="1"}
                    <span style="color:#3c8aff;line-height: 21px;">审核中</span>
                    {/case}
                    {case value="2"}
                    <span style="color:#5FB878;line-height: 21px;">预约成功</span>
                    {/case}
                    {case value="3"}
                    检测中
                    {/case}
                    {case value="10"}
                    已完成
                    {/case}
                    {/switch}
                </td>
				<td>{$val.license_number}</td>
				<td>{$val.license_type|get_license_type}</td>
				<td>{$val.user_name}</td>
				<td>{$val.mobile}</td>
                <td>{$val.total_amount}</td>
				<td>{$val.subscribe_date|date="Y-m-d H:i",###}</td>
				<td>{$val.create_time|date="Y-m-d H:i:s",###}</td>
				<td class="oper">
					<a rel="order_see" class="adeditd" href="{:url('Sqd/detail')}?id={$val.order_id}" target='navTab' title="详情" mask="true" style="color:#000;">查看</a>
					{if condition="$val.order_status eq 2"}
					<a rel="next_time" class="delete" href="{:url('Sqd/next_time')}?order_id={$val.order_id}" target="navTab"
					title="下次检车时间" mask="true" style="color:#000;"><span>检验合格</span></a>
					{/if}
					<a rel="order_print" class="adprint" href="{:url('Sqd/orderprint')}?id={$val.order_id}" target='navTab' title="打印" external="true" style="color:#000;">打印</a>
				</td>
			</tr>
			{/volist}
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>共{$count}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$count}" numPerPage="{$numPerPage}" pageNumShown="10"
		currentPage="{$pageNum}"></div>
	</div>
</div>